<?php
namespace Modules\Order\Listeners;

use Modules\Order\Events\OrderPaidEvent;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;


// class OrderPaidListener implements ShouldQueue
class OrderPaidListener
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
    }

    /**
     * Handle the event.
     *
     * @param Order $event
     * @return void
     */
    public function handle($event)
    {
        $order = $event->order;

        $order->paidListenerAsync();
        // $order->user->notify(new \Modules\Order\Notifications\OrderPaid($order));
        // \Log::error('order pay listen handle: ' . $order->id);
        // $order->paidListenerAsync();
    }
}
